/**
* Copyright (c) 2013-2014, qtone Inc. All Rights Reserved.
*
* @author: tanghuaicheng
* Project Name: testuc
* $Id:   2017-01-11 10:54:07 $
*/
package com.bangcommunity.bbframe.common.base;

public class BaseMap<K extends Object, V extends Object> implements java.io.Serializable {
    private static final long serialVersionUID = 1L;
    private K id;// 实际的值
    private V value;// 显示的名称

    public BaseMap() {

    }

    public BaseMap(K id, V value) {
        this.id = id;
        this.value = value;
    }

    public K getId() {
        return id;
    }

    public void setId(K id) {
        this.id = id;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        BaseMap<?, ?> baseMap = (BaseMap<?, ?>) o;

        if (id != null ? !id.equals(baseMap.id) : baseMap.id != null)
            return false;
        return !(value != null ? !value.equals(baseMap.value) : baseMap.value != null);

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "BaseMap{" + "id=" + id + ", value=" + value + '}';
    }
}